#ifndef BIG_INT
#define BIG_INT

#include <string>
#include <vector>
#include <fstream>
#include <algorithm>

class big_int
{
public:
	big_int();
	big_int(long long);
	big_int(const std::string&);
	big_int(const std::vector<long long>&);

	long long compare(const big_int&);
	long long find_divider(const big_int&);
	friend int length(const int&);

	std::pair <big_int, big_int> operator / (const big_int&);
	big_int& operator = (const big_int&);
	big_int& operator -= (const big_int&);
	big_int& operator *= (const int&);
	bool operator == (const big_int&);

	friend big_int operator * (const big_int&, const int&);
	friend std::istream& operator >> (std::istream&, big_int&);
	friend std::ostream& operator << (std::ostream&, big_int&); 

private:
	static const int base = 1000000000;
	static const int base_length = 9;

	long long shift;
	std::vector<long long> digits;

	void remove_zeroes();
	void restore();
};
#endif


